package com.ttg.web.dao.Impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ttg.model.mapper.QualityManageWeightConfigMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ttg.model.po.QualityManageLadderRulePO;
import com.ttg.model.pojo.QualityManageLadderRule;
import com.ttg.model.pojo.QualityManageWeightConfig;
import com.ttg.web.dao.QualityManageWeightConfigDao;
import org.springframework.stereotype.Service;

import java.util.Objects;

/**
 * 质量管理权重分配表(TblQualityManageWeightConfig) daoImpl
 *
 * @author chenyou
 * @datetime 2025-08-18 14:50:36
 */
@Service
public class QualityManageWeightConfigDaoImpl extends ServiceImpl<QualityManageWeightConfigMapper, QualityManageWeightConfig> implements QualityManageWeightConfigDao {


    @Override
    public QualityManageWeightConfig getByUnique(Long orgNo, Integer dim) {
        LambdaQueryWrapper<QualityManageWeightConfig> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(QualityManageWeightConfig::getWcOrgNo,orgNo)
                .eq(QualityManageWeightConfig::getWcDimType,dim);
        return getOne(wrapper);
    }

}

